package com.service.impl;

import com.dao.StudentDao;
import com.domain.Student;
import com.service.StudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author liujunjie
 * @create 2021-11-22 19:36
 */
@Service
public class StudentServiceImpl implements StudentService {


    @Autowired
    private StudentDao dao;

    @Override
    public int addStudent(Student student) {

        int rows = dao.insertStudent(student);
        return rows;

    }

    @Override
    public List<Student> queryStudents() {
        List<Student> list = dao.selectStudents();
        return list;
    }
}
